package bavaria.hightech.banking.gui;

import bavaria.hightech.banking.bank.BankImpl;
import bavaria.hightech.banking.money.Currency.currencyEnum;

/**
 * A simple test class for the GUI with a main(). Adds some conditions, accounds
 * and some money and starts the GUI (new Frame)
 * 
 * @author Dietmar
 */
public class GUITest {

	public static Frame frame;

	public static void main(String[] args) {

		BankImpl bank = new BankImpl("Sparkasse", "de");
		Integer fixedDepositConditionNr;
		Integer fixedDepositAccNr;
		Integer giroAccNr;
		Integer giroConditionNr;

		fixedDepositConditionNr = bank.createFixedDepositCondition(12, 2); // Habenszins,
																			// Laufzeit
																			// in
																			// Monaten
		fixedDepositAccNr = bank.createFixedDepositAcc("Kunde1",
				fixedDepositConditionNr);
		bank.addAmount(currencyEnum.EURO, fixedDepositAccNr, 100000,
				"einzahlung von 1k EUR");

		giroConditionNr = bank.createGiroCondition(12, 2, 0); // Habenszins,
																// Sollzins,
																// Rating
		giroAccNr = bank.createGiroAcc("Kunde2", giroConditionNr);
		bank.addAmount(currencyEnum.EURO, giroAccNr, 50000,
				"einzahlung von 1k EUR");

		frame = new Frame(bank);
	}

}
